﻿//#define MYDEBUG
using Crosstales.RTVoice;
using Crosstales.RTVoice.Tool;
using DG.Tweening;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

#region 准备内容
public enum 消息
{
    播放增加了,
    点赞增加了,
    点赞减少了,
    粉丝增加了,
    粉丝减少了
}

[Serializable]
public class bilibili粉丝
{
    public int code;
    public string message;
    public int ttl;
    public MyData data;
}

[Serializable]
public class MyData
{
    public int mid;
    public int following;
    public int whisper;
    public int black;
    public int follower;
}

///
[Serializable]
public class bilibili播放点赞
{
    public int code;
    public string message;
    public int ttl;
    public bilibili播放点赞data data;
}

[Serializable]
public class bilibili播放点赞data
{
    public bilibili播放点赞archive archive;
    public int likes; //点赞
}

[Serializable]
public class bilibili播放点赞archive
{
    public int view;
}

///
[Serializable]
public class bilibili个人信息
{
    public int code;
    public string message;
    public int ttl;
    public bilibili个人信息data data;
}

[Serializable]
public class bilibili个人信息data
{
    public bilibili个人信息data_owner owner;
}

[Serializable]
public class bilibili个人信息data_owner
{
    public int mid;
    public string name;
    public string face;
    public bilibili播放点赞data data;
}

///最新视频播放
[Serializable]
public class bilibili视频
{
    public int code;
    public string message;
    public int ttl;
    public bilibili视频data data;
}

[Serializable]
public class bilibili视频data
{
    public bilibili视频list list;
    public bilibili视频page page;
}

[Serializable]
public class bilibili视频list
{
    public bilibili视频tlist tlist;
    public List<bilibili视频vlist> vlist;
}

[Serializable]
public class bilibili视频tlist
{

}

[Serializable]
public class bilibili视频vlist
{
    public int play;
}

[Serializable]
public class bilibili视频page
{

}
#endregion

public class Fuck : MonoBehaviour
{
    private const string c_strtoggle震动播放数 = "toggle震动播放数";
    private const string c_strtoggle语音播放数 = "toggle语音播放数";
    private const string c_strtoggle震动点赞数 = "toggle震动点赞数";
    private const string c_strtoggle语音点赞数 = "toggle语音点赞数";
    private const string c_strtoggle震动粉丝数 = "toggle震动粉丝数";
    private const string c_strtoggle语音粉丝数 = "toggle语音粉丝数";
    public static string s_strVMID = "15766978";
    public float m_f刷新间隔 = 3.3f;

    #region 个人信息
    //1.api
    private string m_str个人信息 => "https://api.bilibili.com/x/space/top/arc?vmid=" + s_strVMID + "&jsonp=jsonp";
    //2.表现内容
    public Text text名字;
    public RawImage image头像;
    //3.内存记录 
    private string m_str名字;
    private string m_str头像URL;
    #endregion


    #region 播放数
    //1.api
    private string m_str播放数 => "https://api.bilibili.com/x/space/arc/search?mid=" + s_strVMID + "&pn=1&ps=25&jsonp=jsonp";
    //2.表现内容
    [Header("播放数")]
    public Text text播放数;
    public Text m_text播放数变化效果;
    public Slider m_slider进度条播放数;
    //3.内存记录 用于比较得到的数据发生了变化 -> 发送给消息队列
    private int m_nCount播放数 = 0;
    //4.是否需要震动
    public Toggle m_toggle震动播放数;
    private bool m_bIs震动播放数
    {
        get => m_toggle震动播放数.isOn;
        set => PlayerPrefs.SetString(s_strVMID + c_strtoggle震动播放数, value.ToString());
    }
    //5.是否播放语音
    public Toggle m_toggle语音播放数;
    private bool m_bIs语音播放数
    {
        get => m_toggle语音播放数.isOn;
        set => PlayerPrefs.SetString(s_strVMID + c_strtoggle语音播放数, value.ToString());
    }
    #endregion


    #region 点赞数
    //1.api
    private string m_str点赞数 => "https://api.bilibili.com/x/space/upstat?mid=" + s_strVMID + "&jsonp=jsonp";
    //2.表现内容
    [Header("点赞数")]
    public Text text点赞数;
    public Text m_text点赞数变化效果;
    public Slider m_slider进度条点赞数;
    //3.内存记录 用于比较得到的数据发生了变化 -> 发送给消息队列
    private int m_n点赞数 = 0;
    //4.是否需要震动
    public Toggle m_toggle震动点赞数;
    private bool m_bIs震动点赞数
    {
        get => m_toggle震动点赞数.isOn;
        set => PlayerPrefs.SetString(s_strVMID + c_strtoggle震动点赞数, value.ToString());
    }
    //5.是否播放语音
    public Toggle m_toggle语音点赞数;
    private bool m_bIs语音点赞数
    {
        get => m_toggle语音点赞数.isOn;
        set => PlayerPrefs.SetString(s_strVMID + c_strtoggle语音点赞数, value.ToString());
    }
    #endregion


    #region 粉丝数
    //1.api
    private string m_str粉丝数 => "https://api.bilibili.com/x/relation/stat?vmid=" + s_strVMID + "&jsonp=jsonp";
    //2.表现内容
    [Header("粉丝数")]
    public Text text粉丝数;
    public Text m_text粉丝数变化效果;
    public Slider m_slider进度条粉丝数;
    //3.内存记录 用于比较得到的数据发生了变化 -> 发送给消息队列
    private int m_n粉丝数 = 0;
    //4.是否需要震动
    public Toggle m_toggle震动粉丝数;
    private bool m_bIs震动粉丝数
    {
        get => m_toggle震动粉丝数.isOn;
        set => PlayerPrefs.SetString(s_strVMID + c_strtoggle震动粉丝数, value.ToString());
    }
    //5.是否播放语音
    public Toggle m_toggle语音粉丝数;
    private bool m_bIs语音粉丝数
    {
        get => m_toggle语音粉丝数.isOn;
        set => PlayerPrefs.SetString(s_strVMID + c_strtoggle语音粉丝数, value.ToString());
    }
    #endregion

    [Header("设置页面")]
    public Button m_but打开设置页面;
    public Button m_but关闭设置页面;
    public RectTransform m_rtf设置页面;

    /// <summary>
    /// 语音系统,负责语音提示
    /// </summary>
    public SpeechText speach;


    /// <summary>
    /// 用于循环判断
    /// 0-播放
    /// 1-点赞
    /// 2-粉丝
    /// </summary>
    private int m_nLoopValue = 0;

    public AnimationCurve m_ac动画效果;


    /// <summary>
    /// 震动效果  语音播报  动画效果
    /// </summary>
    private void 播放消息(消息 _消息, string _str符号, int _nCount)
    {
        switch (_消息)
        {
            case 消息.播放增加了:
                if (m_bIs语音播放数)
                {
                    speach.Text = _消息.ToString() + _nCount.ToString() + "个";
                    speach.Speak();
                }
                if (m_bIs震动播放数)
                {
#if UNITY_ANDROID
                    Handheld.Vibrate();
#endif
                }
                m_text播放数变化效果.text = _str符号 + _nCount.ToString();
                m_text播放数变化效果.DOFade(1.0f, m_f刷新间隔).SetEase(m_ac动画效果);
                break;

            case 消息.点赞增加了:
            case 消息.点赞减少了:
                if (m_bIs语音点赞数)
                {
                    speach.Text = _消息.ToString() + _nCount.ToString() + "个";
                    speach.Speak();
                }
                if (m_bIs震动点赞数)
                {
#if UNITY_ANDROID
                    Handheld.Vibrate();
#endif
                }
                m_text点赞数变化效果.text = _str符号 + _nCount.ToString();
                m_text点赞数变化效果.DOFade(1.0f, m_f刷新间隔).SetEase(m_ac动画效果);
                break;

            case 消息.粉丝增加了:
            case 消息.粉丝减少了:
                if (m_bIs语音粉丝数)
                {
                    speach.Text = _消息.ToString() + _nCount.ToString() + "个";
                    speach.Speak();
                }
                if (m_bIs震动粉丝数)
                {
#if UNITY_ANDROID
                    Handheld.Vibrate();
#endif
                }
                m_text粉丝数变化效果.text = _str符号 + _nCount.ToString();
                m_text粉丝数变化效果.DOFade(1.0f, m_f刷新间隔).SetEase(m_ac动画效果);
                break;

            default:
                break;
        }
    }


    /// <summary>
    /// 获得个人信息  包括个人name  和头像URL  再通过URL下载头像(android需要调整AndroidManifest.xml文件  调整权限,否则无法下载头像)
    /// </summary>
    /// <returns>协程</returns>
    private IEnumerator Get个人信息()
    {
        UnityWebRequest webRequest个人信息 = UnityWebRequest.Get(m_str个人信息);
        yield return webRequest个人信息.SendWebRequest();

        //异常处理，很多博文用了error!=null这是错误的，请看下文其他属性部分
        if (webRequest个人信息.isHttpError || webRequest个人信息.isNetworkError)
        {
            Debug.Log(webRequest个人信息.error);
            SceneManager.LoadScene(0);
        }
        else
        {
#if UNITY_EDITOR && MYDEBUG
            Debug.Log(webRequest个人信息.downloadHandler.text);
#endif
            bilibili个人信息 v_bilibili = JsonUtility.FromJson<bilibili个人信息>(webRequest个人信息.downloadHandler.text);

            m_str名字 = v_bilibili.data.owner.name;
            m_str头像URL = v_bilibili.data.owner.face;

            text名字.text = m_str名字;
#if UNITY_EDITOR && MYDEBUG
            Debug.Log(m_str头像URL);
#endif

            using (UnityWebRequest webRequest头像 = UnityWebRequestTexture.GetTexture(m_str头像URL))
            {
                yield return webRequest头像.SendWebRequest();
                if (webRequest头像.isNetworkError || webRequest头像.isHttpError)
                {
                    Debug.LogError("4" + webRequest头像.error);
                }
                else
                {
                    // Get downloaded asset bundle
                    Texture2D m_texture头像 = DownloadHandlerTexture.GetContent(webRequest头像);
                    image头像.texture = m_texture头像;
                }
            }
        }
        InvokeRepeating("播放消息", 1.0f, 3.3f);
    }


    /// <summary>
    /// 获得播放数   这个播放数  是近25个视频的总数   并不是所有的   如果有一天需要调整  需要调整对应api后面的参数
    /// </summary>
    /// <returns>协程</returns>
    private IEnumerator Get播放数(bool _bIsFirstLogin = false)
    {
        if (!_bIsFirstLogin)
        {
            m_slider进度条播放数.value = 0.0f;
            m_slider进度条播放数.DOValue(1.0f, m_f刷新间隔).SetEase(m_ac动画效果);
        }

        UnityWebRequest webRequest视频播放数 = UnityWebRequest.Get(m_str播放数);
        yield return webRequest视频播放数.SendWebRequest();

        //异常处理，很多博文用了error!=null这是错误的，请看下文其他属性部分
        if (webRequest视频播放数.isHttpError || webRequest视频播放数.isNetworkError)
        {
            Debug.Log(webRequest视频播放数.error);
        }
        else
        {
#if UNITY_EDITOR && MYDEBUG
            Debug.Log(webRequest视频播放数.downloadHandler.text);
#endif
            bilibili视频 v_bilibili = JsonUtility.FromJson<bilibili视频>(webRequest视频播放数.downloadHandler.text);
#if UNITY_EDITOR && MYDEBUG
            Debug.Log(v_bilibili.data.list.vlist.Count);
#endif
            int v_nCount视频播放总数 = 0;
            for (int i = 0; i < v_bilibili.data.list.vlist.Count; i++)
            {
                v_nCount视频播放总数 += v_bilibili.data.list.vlist[i].play;
            }

            if (v_nCount视频播放总数 != m_nCount播放数)
            {
                if (!_bIsFirstLogin)
                {
                    播放消息(消息.播放增加了, "↑", v_nCount视频播放总数 - m_nCount播放数);
                }
            }
            m_nCount播放数 = v_nCount视频播放总数;
            text播放数.text = m_nCount播放数.ToString();
            PlayerPrefs.SetInt(s_strVMID + "播放", m_nCount播放数);
        }
    }


    /// <summary>
    /// 获得点赞数
    /// </summary>
    /// <returns>协程</returns>
    private IEnumerator Get点赞数(bool _bIsFirstLogin = false)
    {
        if (!_bIsFirstLogin)
        {
            m_slider进度条点赞数.value = 0.0f;
            m_slider进度条点赞数.DOValue(1.0f, m_f刷新间隔).SetEase(m_ac动画效果);
        }
        UnityWebRequest webRequest播放点赞 = UnityWebRequest.Get(m_str点赞数);
        yield return webRequest播放点赞.SendWebRequest();

        //异常处理，很多博文用了error!=null这是错误的，请看下文其他属性部分
        if (webRequest播放点赞.isHttpError || webRequest播放点赞.isNetworkError)
        {
            Debug.Log(webRequest播放点赞.error);
        }
        else
        {
#if UNITY_EDITOR && MYDEBUG
            Debug.Log(webRequest播放点赞.downloadHandler.text);
#endif
            bilibili播放点赞 v_bilibili = JsonUtility.FromJson<bilibili播放点赞>(webRequest播放点赞.downloadHandler.text);

            if (m_n点赞数 < v_bilibili.data.likes)
            {
                if (!_bIsFirstLogin)
                {
                    播放消息(消息.点赞增加了, "↑", v_bilibili.data.likes - m_n点赞数);
                }
            }
            else
            {
                if (m_n点赞数 > v_bilibili.data.likes)
                {
                    if (!_bIsFirstLogin)
                    {
                        播放消息(消息.点赞减少了, "↓", m_n点赞数 - v_bilibili.data.likes);
                    }
                }
            }
            m_n点赞数 = v_bilibili.data.likes;
            text点赞数.text = m_n点赞数.ToString();
            PlayerPrefs.SetInt(s_strVMID + "点赞", m_n点赞数);
        }
    }


    /// <summary>
    /// 获得粉丝数
    /// </summary>
    /// <returns>协程</returns>
    private IEnumerator Get粉丝数(bool _bIsFirstLogin = false)
    {
        if (!_bIsFirstLogin)
        {
            m_slider进度条粉丝数.value = 0.0f;
            m_slider进度条粉丝数.DOValue(1.0f, m_f刷新间隔).SetEase(m_ac动画效果);
        }
        UnityWebRequest webRequest粉丝数 = UnityWebRequest.Get(m_str粉丝数);
        yield return webRequest粉丝数.SendWebRequest();

        //异常处理，很多博文用了error!=null这是错误的，请看下文其他属性部分
        if (webRequest粉丝数.isHttpError || webRequest粉丝数.isNetworkError)
        {
            Debug.Log(webRequest粉丝数.error);
        }
        else
        {
#if UNITY_EDITOR && MYDEBUG
            Debug.Log(webRequest粉丝数.downloadHandler.text);
#endif
            bilibili粉丝 v_bilibili = JsonUtility.FromJson<bilibili粉丝>(webRequest粉丝数.downloadHandler.text);
            if (m_n粉丝数 < v_bilibili.data.follower)
            {
                if (!_bIsFirstLogin)
                {
                    播放消息(消息.粉丝增加了, "↑", v_bilibili.data.follower - m_n粉丝数);
                }
            }
            else
            {
                if (m_n粉丝数 > v_bilibili.data.follower)
                {
                    if (!_bIsFirstLogin)
                    {
                        播放消息(消息.粉丝减少了, "↓", m_n粉丝数 - v_bilibili.data.follower);
                    }
                }
            }
            m_n粉丝数 = v_bilibili.data.follower;
            text粉丝数.text = m_n粉丝数.ToString();
            PlayerPrefs.SetInt(s_strVMID + "粉丝", m_n粉丝数);
        }
    }


    // 仅在首次调用 Update 方法之前调用 Start
    private void Start()
    {
        //获取头像和个人名称
        StartCoroutine(Get个人信息());

        //如果之前登陆过, 那么从持久化数据中得到这些数据,方便获取数据的时候进行数据比较
        if (PlayerPrefs.HasKey(s_strVMID))
        {
            m_nCount播放数 = PlayerPrefs.GetInt(s_strVMID + "播放");
            text播放数.text = m_nCount播放数.ToString();

            m_n点赞数 = PlayerPrefs.GetInt(s_strVMID + "点赞");
            text点赞数.text = m_n点赞数.ToString();

            m_n粉丝数 = PlayerPrefs.GetInt(s_strVMID + "粉丝");
            text粉丝数.text = m_n粉丝数.ToString();
        }
        else
        {
            //给一个标记,让设备记住这个人登陆过,下次登陆直接报差值
            PlayerPrefs.SetInt(s_strVMID, 1);

            PlayerPrefs.SetString(s_strVMID + c_strtoggle震动播放数, false.ToString());
            PlayerPrefs.SetString(s_strVMID + c_strtoggle语音播放数, false.ToString());

            PlayerPrefs.SetString(s_strVMID + c_strtoggle震动点赞数, false.ToString());
            PlayerPrefs.SetString(s_strVMID + c_strtoggle语音点赞数, false.ToString());

            PlayerPrefs.SetString(s_strVMID + c_strtoggle震动粉丝数, false.ToString());
            PlayerPrefs.SetString(s_strVMID + c_strtoggle语音粉丝数, false.ToString());

            StartCoroutine(Get播放数(true));
            StartCoroutine(Get点赞数(true));
            StartCoroutine(Get粉丝数(true));
        }

        m_toggle震动播放数.isOn = bool.Parse(PlayerPrefs.GetString(s_strVMID + c_strtoggle震动播放数));
        m_toggle语音播放数.isOn = bool.Parse(PlayerPrefs.GetString(s_strVMID + c_strtoggle语音播放数));
        m_toggle震动点赞数.isOn = bool.Parse(PlayerPrefs.GetString(s_strVMID + c_strtoggle震动点赞数));
        m_toggle语音点赞数.isOn = bool.Parse(PlayerPrefs.GetString(s_strVMID + c_strtoggle语音点赞数));
        m_toggle震动粉丝数.isOn = bool.Parse(PlayerPrefs.GetString(s_strVMID + c_strtoggle震动粉丝数));
        m_toggle语音粉丝数.isOn = bool.Parse(PlayerPrefs.GetString(s_strVMID + c_strtoggle语音粉丝数));


        //屏幕不息屏
        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        //设置 按钮可以打开设置页面
        m_but打开设置页面.onClick.AddListener(() =>
        {
            m_rtf设置页面.DOAnchorPosY(0, 0.25f);
        });

        m_but关闭设置页面.onClick.AddListener(() =>
        {
            m_rtf设置页面.DOAnchorPosY(1080, 0.25f);
        });

        m_toggle震动播放数.onValueChanged.AddListener((bool _arg0) =>
        {
            m_bIs震动播放数 = _arg0;
        });

        m_toggle语音播放数.onValueChanged.AddListener((bool _arg0) =>
        {
            m_bIs语音播放数 = _arg0;
        });

        m_toggle震动点赞数.onValueChanged.AddListener((bool _arg0) =>
        {
            m_bIs震动点赞数 = _arg0;
        });

        m_toggle语音点赞数.onValueChanged.AddListener((bool _arg0) =>
        {
            m_bIs语音点赞数 = _arg0;
        });

        m_toggle震动粉丝数.onValueChanged.AddListener((bool _arg0) =>
        {
            m_bIs震动粉丝数 = _arg0;
        });

        m_toggle语音粉丝数.onValueChanged.AddListener((bool _arg0) =>
        {
            m_bIs语音粉丝数 = _arg0;
        });
    }


    // 如果启用 MonoBehaviour，则每个固定帧速率的帧都将调用此函数
    private void FixedUpdate()
    {
        switch (m_nLoopValue++)
        {
            case 0:
                StartCoroutine(Get播放数());
                break;

            case 1:
                StartCoroutine(Get点赞数());
                break;

            case 2:
                StartCoroutine(Get粉丝数());
                break;

            default:
                break;
        }

        if (m_nLoopValue >= 3)
        {
            m_nLoopValue = 0;
        }
    }
}
/*
{
	"code": 0,
	"message": "0",
	"ttl": 1,
	"data": {
		"archive": {
			"view": 1284
		},
		"article": {
			"view": 0
		},
		"likes": 40
	}
}
 

{
	"code": 0,
	"message": "0",
	"ttl": 1,
	"data": {
		"aid": 57782419,
		"videos": 1,
		"tid": 39,
		"tname": "演讲• 公开课",
		"copyright": 1,
		"pic": "http://i0.hdslb.com/bfs/archive/0202c404f63b44d7556349267ab01b6f3924eabe.jpg",
		"title": "[unity教程][干货][60帧]通过代码制作模型",
		"pubdate": 1562206654,
		"ctime": 1562206654,
		"desc": "这是一个unity3d的教程\r\n内容是[通过代码制作模型]\r\n全套代码发布在github上\r\nhttps://github.com/js305492881/MakeAModelFrom-code\r\n有问题可以随时联系我",
		"state": 0,
		"attribute": 16512,
		"duration": 1188,
		"rights": {
			"bp": 0,
			"elec": 0,
			"download": 0,
			"movie": 0,
			"pay": 0,
			"hd5": 0,
			"no_reprint": 1,
			"autoplay": 1,
			"ugc_pay": 0,
			"is_cooperation": 0,
			"ugc_pay_preview": 0,
			"no_background": 0
		},
		"owner": {
			"mid": 15766978,
			"name": "AsiWorld",
			"face": "http://i1.hdslb.com/bfs/face/ff1c2f90497e4e97478dfcec946cb0b1216b3224.jpg"
		},
		"stat": {
			"aid": 57782419,
			"view": 152,
			"danmaku": 0,
			"reply": 1,
			"favorite": 18,
			"coin": 12,
			"share": 1,
			"now_rank": 0,
			"his_rank": 0,
			"like": 11,
			"dislike": 0
		},
		"dynamic": "",
		"cid": 100853646,
		"dimension": {
			"width": 1920,
			"height": 1080,
			"rotate": 0
		},
		"bvid": "",
		"reason": "",
		"inter_video": false
	}
}


//每个视频的播放数量
{
	"code": 0,
	"message": "0",
	"ttl": 1,
	"data": [{
		"cid": 100192,
		"mid": 15766978,
		"name": "unity教学",
		"intro": "",
		"mtime": 1580018745,
		"count": 2,
		"cover": "http://i0.hdslb.com/bfs/archive/8d9259b05292318e76ae8037098d5b8bee380303.jpg",
		"archives": [{
			"aid": 57782419,
			"videos": 1,
			"tid": 39,
			"tname": "演讲• 公开课",
			"copyright": 1,
			"pic": "http://i0.hdslb.com/bfs/archive/0202c404f63b44d7556349267ab01b6f3924eabe.jpg",
			"title": "[unity教程][干货][60帧]通过代码制作模型",
			"pubdate": 1562206654,
			"ctime": 1562206654,
			"desc": "这是一个unity3d的教程\r\n内容是[通过代码制作模型]\r\n全套代码发布在github上\r\nhttps://github.com/js305492881/MakeAModelFrom-code\r\n有问题可以随时联系我",
			"state": 0,
			"attribute": 16512,
			"duration": 1188,
			"rights": {
				"bp": 0,
				"elec": 0,
				"download": 0,
				"movie": 0,
				"pay": 0,
				"hd5": 0,
				"no_reprint": 1,
				"autoplay": 1,
				"ugc_pay": 0,
				"is_cooperation": 0,
				"ugc_pay_preview": 0,
				"no_background": 0
			},
			"owner": {
				"mid": 15766978,
				"name": "AsiWorld",
				"face": "http://i1.hdslb.com/bfs/face/ff1c2f90497e4e97478dfcec946cb0b1216b3224.jpg"
			},
			"stat": {
				"aid": 57782419,
				"view": 152,
				"danmaku": 0,
				"reply": 1,
				"favorite": 18,
				"coin": 12,
				"share": 1,
				"now_rank": 0,
				"his_rank": 0,
				"like": 11,
				"dislike": 0
			},
			"dynamic": "",
			"cid": 100853646,
			"dimension": {
				"width": 1920,
				"height": 1080,
				"rotate": 0
			},
			"bvid": "",
			"inter_video": false
		}, {
			"aid": 57718238,
			"videos": 0,
			"tid": 0,
			"tname": "",
			"copyright": 0,
			"pic": "http://i0.hdslb.com/bfs/archive/8d9259b05292318e76ae8037098d5b8bee380303.jpg",
			"title": "[unity教程][干货]通过代码制作模型",
			"pubdate": 1562152695,
			"ctime": 0,
			"desc": "",
			"state": -100,
			"duration": 0,
			"rights": {
				"bp": 0,
				"elec": 0,
				"download": 0,
				"movie": 0,
				"pay": 0,
				"hd5": 0,
				"no_reprint": 0,
				"autoplay": 0,
				"ugc_pay": 0,
				"is_cooperation": 0,
				"ugc_pay_preview": 0,
				"no_background": 0
			},
			"owner": {
				"mid": 0,
				"name": "",
				"face": ""
			},
			"stat": {
				"aid": 57718238,
				"view": 98,
				"danmaku": 0,
				"reply": 1,
				"favorite": 5,
				"coin": 0,
				"share": 1,
				"now_rank": 0,
				"his_rank": 0,
				"like": 2,
				"dislike": 0
			},
			"dynamic": "",
			"dimension": {
				"width": 0,
				"height": 0,
				"rotate": 0
			},
			"bvid": "",
			"inter_video": false
		}]
	}, {
		"cid": 80200,
		"mid": 15766978,
		"name": "生活",
		"intro": "简单生活记录",
		"mtime": 1563287632,
		"count": 2,
		"cover": "http://i1.hdslb.com/bfs/archive/d2e804724dacfc6b79c150292b4187fefed5c758.jpg",
		"archives": [{
			"aid": 84982330,
			"videos": 1,
			"tid": 21,
			"tname": "日常",
			"copyright": 1,
			"pic": "http://i1.hdslb.com/bfs/archive/b8ec67b87a572cf05097cbb50d5511029d66b52c.jpg",
			"title": "武汉封城，除夕只能在武汉过，武汉现在的状态和我心里的变化",
			"pubdate": 1579944212,
			"ctime": 1579944212,
			"desc": "视频发的晚了点，具体内容就是：武汉封城了，我和媳妇在武汉过年，心理和身体都很健康，多做一些记录让我们会看的时候知道我们当时是多么的勇敢和乐观！",
			"state": 0,
			"attribute": 16768,
			"duration": 531,
			"rights": {
				"bp": 0,
				"elec": 0,
				"download": 0,
				"movie": 0,
				"pay": 0,
				"hd5": 1,
				"no_reprint": 1,
				"autoplay": 1,
				"ugc_pay": 0,
				"is_cooperation": 0,
				"ugc_pay_preview": 0,
				"no_background": 0
			},
			"owner": {
				"mid": 15766978,
				"name": "AsiWorld",
				"face": "http://i1.hdslb.com/bfs/face/ff1c2f90497e4e97478dfcec946cb0b1216b3224.jpg"
			},
			"stat": {
				"aid": 84982330,
				"view": 894,
				"danmaku": 1,
				"reply": 9,
				"favorite": 5,
				"coin": 10,
				"share": 3,
				"now_rank": 0,
				"his_rank": 0,
				"like": 17,
				"dislike": 0
			},
			"dynamic": "",
			"cid": 145317356,
			"dimension": {
				"width": 1920,
				"height": 1080,
				"rotate": 0
			},
			"bvid": "",
			"inter_video": false
		}, {
			"aid": 84542846,
			"videos": 1,
			"tid": 21,
			"tname": "日常",
			"copyright": 1,
			"pic": "http://i1.hdslb.com/bfs/archive/d2e804724dacfc6b79c150292b4187fefed5c758.jpg",
			"title": "春节前夕武汉的日常vlog",
			"pubdate": 1579685633,
			"ctime": 1579685633,
			"desc": "记录一下自己的生活。",
			"state": 0,
			"attribute": 16768,
			"duration": 240,
			"mission_id": 12702,
			"rights": {
				"bp": 0,
				"elec": 0,
				"download": 0,
				"movie": 0,
				"pay": 0,
				"hd5": 1,
				"no_reprint": 1,
				"autoplay": 1,
				"ugc_pay": 0,
				"is_cooperation": 0,
				"ugc_pay_preview": 0,
				"no_background": 0
			},
			"owner": {
				"mid": 15766978,
				"name": "AsiWorld",
				"face": "http://i1.hdslb.com/bfs/face/ff1c2f90497e4e97478dfcec946cb0b1216b3224.jpg"
			},
			"stat": {
				"aid": 84542846,
				"view": 117,
				"danmaku": 2,
				"reply": 1,
				"favorite": 2,
				"coin": 5,
				"share": 0,
				"now_rank": 0,
				"his_rank": 0,
				"like": 5,
				"dislike": 0
			},
			"dynamic": "医生护士现在才是一线战士",
			"cid": 144598556,
			"dimension": {
				"width": 1920,
				"height": 1080,
				"rotate": 0
			},
			"bvid": "",
			"inter_video": false
		}]
	}]
}
     */
